import rclpy
from rclpy.node import Node
from geometry_msgs.msg import PointStamped
class PointTFBroadcasterPy(Node):
    def __init__(self):
        super().__init__("point_tf_broadcaster_py_node")
        self.pub_point=self.create_publisher(PointStamped,"point",10)
        self.timer=self.create_timer(1.0,self.on_timer)
        self.x=0.0
    def on_timer(self):
        ps=PointStamped()
        ps.header.stamp=self.get_clock().now().to_msg()
        ps.header.frame_id="laser"
        self.x+=0.05
        ps.point.x=self.x
        ps.point.y=0.0
        ps.point.z=0.0
        self.pub_point.publish(ps)
def main():
    rclpy.init()
    rclpy.spin(PointTFBroadcasterPy())
    rclpy.shutdown()
if __name__=='__main__':
    main()
